using System;
using System.Collections.Generic;
using GGEditor.API;

namespace GGEditor.Core.Plugins
{
	public class PluginExtensionBuilder : IPluginExtension
	{
		string path;
		IList<IPluginNode> nodes;

		public PluginExtensionBuilder(string path, params IPluginNode[] nodes)
		{
			this.path = path;
			this.nodes = new List<IPluginNode>(nodes);
		}

		public void AddNode(IPluginNode node)
		{
			nodes.Add(node);
		}

		#region Implementation of IPluginExtension

		public string Path
		{
			get { return path; }
			set { path = value; }
		}

		public IEnumerable<IPluginNode> Nodes
		{
			get { return nodes; }
			set { nodes = new List<IPluginNode>(value); }
		}

		#endregion
	}
}